package com.hoas.quickstart.threads.chapter04.chapter04_1_7;

public class Run2 {

    public static void main(String[] args) {
        MyService service = new MyService();

        MyThreadA[] threadA = new MyThreadA[10];
        MyThreadB[] threadB = new MyThreadB[10];

        for (int i = 0;i < 10; i++) {
            threadA[i] = new MyThreadA( service );
            threadB[i] = new MyThreadB( service );
            threadA[i].start();
            threadB[i].start();
        }


        MyThreadA a = new MyThreadA( service );
        a.start();
        MyThreadB b = new MyThreadB( service);
        b.start();
    }

}
